package com.rainsoftware.LicenseSystem.models.entity;

import com.rainsoftware.LicenseSystem.models.entity.base.BaseEntity;
import gaarason.database.annotation.Column;
import gaarason.database.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;


@Data
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "products")
public class Product extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** auto generator start **/

    @Column(name = "api_id")
    private String apiId;

    @Column(name = "name")
    private String name;

    @Column(name = "developer_id", nullable = true)
    private Integer developerId;

    @Column(name = "created_at")
    private LocalDateTime timeCreated;

    @Column(name = "activation_count")
    private Integer activationCount;

    @Column(name = "key_count")
    private Integer keyCount;

    /** auto generator end **/
    @Repository
    public static class Model extends BaseEntity.BaseModel<Product, Integer> {

    }
}